package org.example;

import Factory.FactoryUserPattern;
import dao.UserDao;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import sun.rmi.server.UnicastServerRef;

public class AppUserFactoryDemo {
    public static void main(String[] args) {
       /* FactoryUserPattern factoryUserPattern = new FactoryUserPattern();
        UserDao user = factoryUserPattern.createUser();
        user.save();*/
       ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");
        UserDao userDao =(UserDao) ctx.getBean("userDao");
        userDao.save();

    }
}
